﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class account_createDriver : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.User.IsInRole("Customer") || Page.User.IsInRole("Driver"))
        {
            Response.Redirect("~/account/profile.aspx");
        }
    }

    protected void giveRoleCustomer(object sender, EventArgs e)
    {
        Roles.AddUserToRole(CreateUserWizard1.UserName.ToString(), "Customer");
    }
    protected void giveRoleDriver(object sender, EventArgs e)
    {
        Roles.AddUserToRole(CreateUserWizard1.UserName.ToString(), "Driver");
    }
}